package com.eshop.modules.activity.service;

import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.eshop.modules.activity.service.dto.StoreCouponUserDto;
import java.util.Map;
import org.springframework.data.domain.Pageable;
import com.eshop.modules.activity.service.dto.StoreCouponUserQueryCriteria;
import com.eshop.modules.activity.vo.StoreCouponUserQueryVo;
import com.eshop.modules.activity.vo.StoreCouponUserVo;
import java.util.List;
import com.eshop.modules.activity.domain.StoreCouponUser;
import com.eshop.common.service.BaseService;

public interface StoreCouponUserService extends BaseService<StoreCouponUser>
{
    int getUserValidCouponCount(final Long uid);
    
    void useCoupon(final int id);
    
    StoreCouponUser getCoupon(final Integer id, final Long uid);
    
    List<StoreCouponUserVo> beUsableCouponList(final Long uid, final String cartIds);
    
    List<StoreCouponUserVo> getUsableCouponList(final Long uid, final double price, final List<String> productIds);
    
    List<StoreCouponUserQueryVo> getUserCoupon(final Long uid);
    
    void addUserCoupon(final Long uid, final Integer cid);
    
    Map<String, Object> queryAll(final StoreCouponUserQueryCriteria criteria, final Pageable pageable);
    
    List<StoreCouponUser> queryAll(final StoreCouponUserQueryCriteria criteria);
    
    void download(final List<StoreCouponUserDto> all, final HttpServletResponse response) throws IOException;
}
